<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Hospital Management Dashboard</title>
  <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
  <meta name="viewport" content="width=device-width,initial-scale=1" />
</head>
<body>
<header>
  <h1>🏥 Hospital Management System</h1>
  <nav>
    <a href="{{ url_for('patients') }}">Patients</a>
    <a href="{{ url_for('appointments') }}">Appointments</a>
    <a href="{{ url_for('medical_records') }}">Medical Records</a>
    <a href="{{ url_for('prescriptions') }}">Prescriptions</a>
    <a href="{{ url_for('reports') }}">Reports</a>
  </nav>
</header>
<main>
  {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
      <div class="flash-container">
        {% for cat, msg in messages %}
          <div class="flash {{ cat }}">{{ msg }}</div>
        {% endfor %}
      </div>
    {% endif %}
  {% endwith %}
  {% block content %}{% endblock %}
</main>
<footer>
  <small>FastAPI backend: {{ request.host.split(':')[0] }}:8000 · Flask frontend port 5000</small>
</footer>
</body>
</html>
